<template>
  <ep-main :data="code">
    <remote-js src="https://unibase.zjzwfw.gov.cn/DTHybirdEngine/DtDream/hybridapi.js"></remote-js>
    <div class="title">您好，您申报的办件已经申报成功！</div>
    <div class="info">
      <p class="ep-border-bottom"><span>办件申报号为：</span>【{{ bod032 }}】</p>
      <p><span style="letter-spacing: 2px;">查询密码为：</span>【{{ bod048 }}】</p>
    </div>
    <button class="ep-button" @click="goBack">返回</button>
  </ep-main>
</template>


<script>
  export default {
    components: {
      'remote-js': {
        render(createElement) {
          return createElement('script', {attrs: {type: 'text/javascript', src: this.src}});
        },
        props: {
          src: {type: String, required: true},
        },
      },
    },
    data() {
      return {
        code: 9999,
        step: 0,
        bod032: "",
        bod048: ""
      }
    },
    mounted() {
      sessionStorage.removeItem("formData");
      let step = this.$route.query.step
      this.step = step && !isNaN(step) ? 0 - parseInt(step) : 0
      this.bod032 = this.$route.query.bod032 || '--'
      this.bod048 = this.$route.query.bod048 || '--'
      setTimeout(() => {
        this.code = 0;
      }, 1000);
    },
    methods: {
      goBack(){
//        window.history.go(this.step);
        dd.biz.navigation.close({
          onSuccess: function (data) {
          },
          onFail: function (error) {
            this.$toast({
              message: error,
              duration: 3000
            });
          }
        })
      }
    }
  }
</script>

<style lang="less" scoped>
  .ep-main {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #ffffff;
    .title {
      padding: 1.48rem .15rem .2rem;
      text-align: center;
      font-size: .15rem;
      color: #333333;
      background: url("../assets/img_success.png") center .8rem no-repeat;
      background-size: .54rem;
    }
    .info {
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.30);
      border-radius: 8px;
      margin: 0 .3rem;
      p {
        height: .4rem;
        font-size: .14rem;
        line-height: .4rem;
        color: #FF0000;
        span {
          display: block;
          float: left;
          padding-left: .15rem;
          width: 1rem;
          color: #666666;
        }
      }
    }

  }
</style>
